home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue70 / Clinic / COMSolution1 / ComClientU.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2001-04-05  |  757 b   |  48 lines

  1. unit ComClientU;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   StdCtrls;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     Button1: TButton;
  12.     Button2: TButton;
  13.     procedure Button1Click(Sender: TObject);
  14.     procedure Button2Click(Sender: TObject);
  15.   private
  16.     { Private declarations }
  17.   public
  18.     { Public declarations }
  19.   end;
  20.  
  21. var
  22.   Form1: TForm1;
  23.  
  24. implementation
  25.  
  26. uses
  27.   BaseLib_TLB, ComServer1_TLB, ComServer2_TLB;
  28.  
  29. {$R *.DFM}
  30.  
  31. procedure TForm1.Button1Click(Sender: TObject);
  32. var
  33.   Foo: IFoo;
  34. begin
  35.   Foo := CoComClass1.Create;
  36.   Foo.Bar
  37. end;
  38.  
  39. procedure TForm1.Button2Click(Sender: TObject);
  40. var
  41.   Foo: IFoo;
  42. begin
  43.   Foo := CoComClass2.Create;
  44.   Foo.Bar
  45. end;
  46.  
  47. end.
  48.